| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

ResourceManager.h
1 // ResourceManager.h
3 //
5
6 namespace nkResources
7 {
39 class ResourceManager final : public nkCommon::SingletonClass<ResourceManager>
40 {
41 public :
42
43 // About working path
49 void setWorkingPath (nkMemory::StringView path) ;
55 void setWorkingPathAbsolute (nkMemory::StringView path) ;
59 nkMemory::StringView getWorkingPath () const ;
63 nkMemory::StringView getWorkingPathAbsolute () const ;
64
65 // Launch path
69 nkMemory::StringView getLaunchedPath () const ;
75 void setLaunchedPath (nkMemory::StringView path) ;
76
77 // Translations
85 nkMemory::String getRelativeFromAbsolute (nkMemory::StringView absolutePath) const ;
93 nkMemory::String getAbsoluteFromRelative (nkMemory::StringView relativePath) const ;
101 nkMemory::String getRelativeFromWorkingDir (nkMemory::StringView workingPath) const ;
109 nkMemory::String getAbsoluteFromWorkingDir (nkMemory::StringView workingPath) const ;
117 nkMemory::String getFromWorkingDirFromRelative (nkMemory::StringView relativePath) const ;
125 nkMemory::String getFromWorkingDirFromAbsolute (nkMemory::StringView absolutePath) const ;
126
127 // Check folders
135 bool checkFileExists (nkMemory::StringView filePathAbs) const ;
143 void checkFolderExists (nkMemory::StringView path) ;
144
145 // Loading
154 nkMemory::Buffer loadFileIntoMemory (nkMemory::StringView filePathAbs, bool silent = false) ;
164 bool saveFileToDisk (nkMemory::StringView outPathAbs, nkMemory::BufferView<> data, bool silent = false) ;
165 } ;
166 }
nkResources::ResourceManager::getFromWorkingDirFromAbsolute
nkMemory::String getFromWorkingDirFromAbsolute(nkMemory::StringView absolutePath) const
nkResources::ResourceManager::checkFolderExists
void checkFolderExists(nkMemory::StringView path)
nkResources::ResourceManager::getRelativeFromWorkingDir
nkMemory::String getRelativeFromWorkingDir(nkMemory::StringView workingPath) const
nkResources::ResourceManager::getRelativeFromAbsolute
nkMemory::String getRelativeFromAbsolute(nkMemory::StringView absolutePath) const
nkMemory::BufferView
A view over data.
Definition: BufferView.h:18
nkResources::ResourceManager::saveFileToDisk
bool saveFileToDisk(nkMemory::StringView outPathAbs, nkMemory::BufferView<> data, bool silent=false)
nkResources::ResourceManager
Manager helping with path finding and resource loading.
Definition: ResourceManager.h:40
nkMemory::Buffer
A buffer holding binary data.
Definition: Buffer.h:32
nkResources::ResourceManager::getWorkingPathAbsolute
nkMemory::StringView getWorkingPathAbsolute() const
nkResources::ResourceManager::getLaunchedPath
nkMemory::StringView getLaunchedPath() const
nkMemory::String
Class holding information about a string, with ownership over the data.
Definition: String.h:22
nkResources::ResourceManager::loadFileIntoMemory
nkMemory::Buffer loadFileIntoMemory(nkMemory::StringView filePathAbs, bool silent=false)
nkMemory::StringView
Class holding information about a string, with no ownership over the data.
Definition: StringView.h:22
nkResources::ResourceManager::checkFileExists
bool checkFileExists(nkMemory::StringView filePathAbs) const
nkResources::ResourceManager::getWorkingPath
nkMemory::StringView getWorkingPath() const
nkResources::ResourceManager::setWorkingPath
void setWorkingPath(nkMemory::StringView path)
nkResources::ResourceManager::getAbsoluteFromRelative
nkMemory::String getAbsoluteFromRelative(nkMemory::StringView relativePath) const
nkResources::ResourceManager::setWorkingPathAbsolute
void setWorkingPathAbsolute(nkMemory::StringView path)
nkResources::ResourceManager::getAbsoluteFromWorkingDir
nkMemory::String getAbsoluteFromWorkingDir(nkMemory::StringView workingPath) const
nkResources::ResourceManager::setLaunchedPath
void setLaunchedPath(nkMemory::StringView path)
nkResources::ResourceManager::getFromWorkingDirFromRelative
nkMemory::String getFromWorkingDirFromRelative(nkMemory::StringView relativePath) const
nkResources
Encompasses all API of component NilkinsResources.
Definition: LogManager.h:7